package com.dhl.fin.api.domain;

import com.dhl.fin.api.common.annotation.ExcelTitle;
import com.dhl.fin.api.common.domain.BasicDomain;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * Created by CuiJianbo on 2020.05.17.
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "t_stock")
public class Stock extends BasicDomain {
    //代码
    @ExcelTitle(name = "代码")
    @Column(columnDefinition = "varchar(8)")
    private String code;

    //公司名字
    @ExcelTitle(name = "名称")
    @Column(columnDefinition = "varchar(20)")
    private String name;

    //今日收盘股价
    @ExcelTitle(name = "最新")
    private Double price;

    //总市值
    @ExcelTitle(name = "总市值")
    @Column(columnDefinition = "varchar(10)")
    private String totalMarketValue;

    //总股本
    @ExcelTitle(name = "总股本")
    @Column(columnDefinition = "varchar(10)")
    private String totalStock;

    //流通市值
    @ExcelTitle(name = "流通市值")
    @Column(columnDefinition = "varchar(10)")
    private String floatMarketValue;

    //流通股本
    @ExcelTitle(name = "流通股本")
    @Column(columnDefinition = "varchar(10)")
    private String floatStock;

    //市盈率(Price to Earning Ratio)
    @ExcelTitle(name = "市盈率(动)")
    private Double peFuture;

    @ExcelTitle(name = "市盈率(静)")
    private Double peNow;

    //市净率(Price/Book value)
    @ExcelTitle(name = "市净率")
    private Double pb;

    //每股收益(Earnings Per Share)
    @ExcelTitle(name = "每股收益")
    private Double eps;

    //每股净资产
    @ExcelTitle(name = "每股净资产")
    private Double aps;

    //所属行业
    @ExcelTitle(name = "所属行业")
    @Column(columnDefinition = "varchar(15)")
    private String trade;

    //人均持股数
    @ExcelTitle(name = "人均持股数")
    @Column(columnDefinition = "varchar(10)")
    private String stockPerPerson;

    //营业总收入
    @ExcelTitle(name = "营业总收入")
    @Column(columnDefinition = "varchar(10)")
    private String totalIncome;

    //营业总收入同比
    @ExcelTitle(name = "营业总收入同比")
    private Double totalIncomeRatio;

    //营业利润
    @ExcelTitle(name = "营业利润")
    @Column(columnDefinition = "varchar(10)")
    private String profit;

    //归属净利润同比
    @ExcelTitle(name = "归属净利润同比")
    private Double profitRatio;

    //总资产
    @ExcelTitle(name = "总资产")
    @Column(columnDefinition = "varchar(10)")
    private String totalAssets;

    //总负债
    @ExcelTitle(name = "总负债")
    @Column(columnDefinition = "varchar(10)")
    private String totalDebt;

    //资产负债比
    @ExcelTitle(name = "资产负债比率")
    private Double dar;

    //股东权益
    @ExcelTitle(name = "股东权益")
    @Column(columnDefinition = "varchar(10)")
    private String holderValue;

    //股东权益比
    @ExcelTitle(name = "股东权益比")
    private Double holderRatio;

    //日期
    private Date date;

    @Transient
    private Date dateStr;


}
